1. Field of Application
The present invention relates to an electronic control apparatus incorporating a control circuit and having a power supply holding function whereby, when an externally produced command designates that the operating power of the control circuit is to be switched off, the supplying of that power is continued during an interval in which the control circuit completes the execution of specific processing.
2. Description of Related Art
In recent years, types of electronic control apparatus have been proposed which have a power supply holding function as described above and also a power supply shut-off function, for example as described in Japanese patent publication No. 2003-312386 which is concerned with an ECU (electronic control unit) of a motor vehicle. With that ECU, when the vehicle driver turns the ignition switch to the on position, so that an ignition switch signal (which serves as a power supply on/off changeover command signal) goes to a high level (corresponding to a power-on command status of the command signal), a power supply control circuit supplies a fixed supply voltage (derived from the vehicle battery voltage) to a CPU (central processing unit), and operation of the CPU then begins. When the ignition switch is subsequently set to the off position, so that the ignition switch signal goes to a low level (corresponding to a power-off command status of the command signal), the CPU executes shut-off processing whereby system operation information is written into an EEPROM (electrically erasable programmable memory). When that shut-off processing is completed, the CPU 11 outputs a power-down permission signal to the power supply control circuit, i.e., constituting a power supply halt command.
At that point, the power supply control circuit halts the supplying of operating power to the CPU, with the operation of the CPU then being halted.
In order to detect abnormality of the operation of the power supply holding function with that apparatus, after the shut-off processing has been executed to completion and before outputting the power-down permission signal, the CPU sets a specific flag that is held in the EEPROM, i.e., a “normal termination indication flag”, to the 1 state. Each time the ignition switch is switched on, the normal termination indication flag is examined and if it is not found to be set in the 1 state (thereby indicating that processing by the CPU was not terminated normally at the preceding occasion when the ignition switch was switched off), then it is judged that an abnormality of the power supply holding function has occurred.
With such an electronic control apparatus, it is possible to detect an abnormality whereby (after the ignition switch is switched off) the power supply voltage does not continue to be supplied to the CPU until completion of the shut-off processing. However it is not possible to detect an abnormality whereby the power supply voltage to the CPU is not cut off even after the shut-off processing has been completed, i.e., a power supply interruption failure type of abnormality occurs. When such an abnormality occurs, then since the predetermined processing (shut-off processing) will be executed to completion by the CPU after the ignition switch has been switched off, the CPU will set the normal termination indication flag to the 1 state.
In the case of a motor vehicle, the vehicle battery is used as the power source for deriving the power supply voltage of the ECU. If a power supply interruption failure abnormality is not detected, then a significant level of current may continue to be supplied to the ECU from the vehicle battery after the ignition switch has been switched off and the ignition key removed. In particular, the aforementioned specific processing may become repetitively executed after the ignition switch has been switched off and the ignition key removed. As a result of this, and due to other control operations that may be performed in such a condition (for controlling actuators etc., normally performed only while the vehicle is being driven) the vehicle battery may become completely discharged.